#ifndef _UI_DEFINES_H_
#define _UI_DEFINES_H_

#ifdef __cplusplus
extern "C" {
#endif

typedef enum 
{
    BAUD_RATE_2400 = 0,
    BAUD_RATE_4800,
    BAUD_RATE_9600,
    BAUD_RATE_19200,
    BAUD_RATE_38400,
    BAUD_RATE_57600,
    BAUD_RATE_115200,
}baud_rate_ids;

/*rtp payload type */
#define UI_RTP_PT_MIN 0
#define UI_RTP_PT_MAX 127

typedef enum {
    UI_PROTOCOL_RTP = 0,
    UI_PROTOCOL_LTP,
    UI_PROTOCOL_TS,
    UI_PROTOCOL_BIND_DEC,
    UI_PROTOCOL_UNKNOWN = 0xF,
    UI_PROTOCOL_TYPE_NUMS,
} stream_protocol_ids;

#define UI_IP_PORT_MIN 1026
#define UI_IP_PORT_MAX 65530

typedef enum {
    UI_ANTI_LOSS_NO = 0,
    UI_ANTI_LOSS_FEC,
    UI_ANTI_LOSS_RETRANS,
    UI_ANTI_LOSS_COMBINE,
    UI_ANTI_LOSS_SRT,
    UI_ANTI_LOSS_NUMS,
} anti_loss_mode_ids;

#define    UI_PKT_MIN_LEN                          (300)
#define    UI_PKT_MAX_LEN                          (1360)

#define UI_ANTI_LOSS_OVERHEAD_MIN  (0)
#define UI_ANTI_LOSS_OVERHEAD_MAX  (50)

typedef enum {
    UI_VID_TYPE_H265 = 0,
    UI_VID_TYPE_H264,
    UI_VID_TYPE_TILE_DEC = 0xf,
    UI_VID_TYPE_NUMS,
} video_codec_type_ids;
    
typedef enum {
    INPUT_SDI_VIDEO = 0,
    INPUT_VGA_VIDEO,
    INPUT_CVBS_VIDEO,
    INPUT_COLOR_VIDEO,
    INPUT_HDMI_VIDEO,
    INPUT_BLACK_VIDEO,
    INPUT_NUM_VIDEO
} videoInput_items;
    
typedef enum {
    INPUT_SDI_AUDIO = 0,
    INPUT_ANALOG_AUDIO,
    INPUT_HDMI_AUDIO,
    INPUT_TEST_TONE,
    INPUT_NUM_AUDIO
} AudioInput_items;
    
typedef enum{
    RECV_SEL_NONE = 0,
    RECV_SEL_IP,
    RECV_SEL_V35,
    RECV_SEL_NUMS,
}recv_interface_items;
    
#define UI_DEC_DEF_LATENESS_TIME     (200) //ms
#define UI_DEC_MIN_LATENESS_TIME     (0) //ms
#define UI_DEC_MAX_LATENESS_TIME     (800) //ms

#define UI_OSD_POSITION_MIN (0)
#define UI_OSD_POSITION_MAX (99)

#define UI_COLOR_VALUE_MIN (0)
#define UI_COLOR_VALUE_MAX (255)
#define UI_COLOR_VALUE_DEFAULT (128)

enum {
    VID_CODEC_OSD_SMALL = 0,
    VID_CODEC_OSD_MIDDLE,
    VID_CODEC_OSD_LARGE,
    VID_CODEC_OSD_SIZE_NUMS,
} video_codec_osd_size;

enum {
    VID_CODEC_OSD_HEI = 0,
    VID_CODEC_OSD_KAI,
    VID_CODEC_OSD_SONG,
    VID_CODEC_OSD_TYPE_NUMS,
} video_codec_osd_type;

enum {
    VID_CODEC_OSD_WHITE = 0,
    VID_CODEC_OSD_YELLOW,
    VID_CODEC_OSD_CYAN,
    VID_CODEC_OSD_GREEN,
    VID_CODEC_OSD_ORANGE,
    VID_CODEC_OSD_RED,
    VID_CODEC_OSD_BLUE,
    VID_CODEC_OSD_BLACK,
    VID_CODEC_OSD_PURPLE,
    VID_CODEC_OSD_COLORLESS,
    VID_CODEC_OSD_COLOR_NUMS,
} video_codec_osd_color;

const static int ucmp_baud_rate[] = 
{
    2400,
    4800,
    9600,
    19200,
    38400,
    57600,
    115200
};

typedef  struct rtp_payload_type
{
    int rtp_audio_pt;//0~127
    int rtp_avc_pt;  //0~127
    int rtp_hevc_pt; //0~127
}rtp_payload_type;


typedef enum{
    LOOPBACK_OFF = 0,
    LOOPBACK_LOCAL_V35,
    LOOPBACK_LOCAL_UDP,
    LOOPBACK_REMOTE_V35,
    LOOPBACK_REMOTE_UDP,
    LOOPBACK_NUMS
}loopback_crtl_refs;
    
typedef enum{
    UDP_SEND_CTRL_OFF = 0,
    UDP_SEND_CTRL_NORMAL,
    UDP_SEND_CTRL_SRT,
    UDP_SEND_CTRL_TYPE_NUMS
}ip_send_ctrl_type;

typedef enum{
    PARAM_LOAD_NONE = 0,
    PARAM_LOAD_IP_DEFAULT,
    PARAM_LOAD_V35_DEFAULT,
    PARAM_LOAD_USER_1,
    PARAM_LOAD_USER_2,
    PARAM_LOAD_USER_3,
    PARAM_LOAD_TYPE_NUMS
}param_load_type;

typedef enum{
    PARAM_SAV_NONE = 0,
    PARAM_SAV_USER1,
    PARAM_SAV_USER2,
    PARAM_SAV_USER3,
    PARAM_SAV_TYPE_NUMS
}param_sav_type;


#ifdef __cplusplus
}
#endif

#endif


